<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script language="javascript" type="text/javascript">
function companyDelete(a){
	if(confirm('정말 삭제 하시겠습니까?')){
		location.href="companyDelete.html?pr_key=" + a; 
	}
}
</script>
<div id="main" class="entry-content">
<center><h1>등록된 회사 List</h1></center>
</div>
<div id="main" class="site-main">
	<div class="entry-content">
		<center>
		<!-- 리스트 뽑아주는 부분 반복 시킬 부분임 -->
			<c:if test="${companyList == '[]' }">
				등록된 회사가 없습니다.<br>
				회사를 등록해 주십시오.<br><br><br><br><br><br>
			</c:if>
			
			<div class="content" id="theme">
			<c:forEach var="list" items="${companyList }" varStatus="status">
			<c:if test="${list.kind == 0 }"><c:set var="kind" value="웹/앱 개발자" /></c:if>
			<c:if test="${list.kind == 2 }"><c:set var="kind" value="웹 개발자" /></c:if>
			<c:if test="${list.kind == 3 }"><c:set var="kind" value="앱 개발자" /></c:if>
			<c:if test="${list.kind == 4 }"><c:set var="kind" value="네트워크 관리자" /></c:if>
			<c:if test="${list.kind == 5 }"><c:set var="kind" value="서버 관리자" /></c:if>
			<c:if test="${list.kind == 6 }"><c:set var="kind" value="보안 전문가" /></c:if>
			<c:if test="${list.kind == 7 }"><c:set var="kind" value="DB 관리자" /></c:if>
				회사명 : <b>${list.name}</b><br>
				시작날 : <b>${list.s_date }</b><br>
				종료날 : <b>${list.e_date }</b><br>
				모집종류 : <b>${kind }</b>
			<a href='javascript:companyDelete("${list.pr_key }")' class="more-button">
				<i class="icon-remove"></i>
		    </a>
		    <br><br>
			</c:forEach>
			</div>
			<!-- 여기까지 반복 부분 -->
			<div class="panel-grid" id="pg-home-0">
				<div class="button" id="portfolio">
					<a href="companyRegView.html"><input type="button" value="등록"></a>
				</div>
			</div>
		</center>
	</div>
</div>